package top.yeyusmile.utils;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

/**
 * @author 夜雨
 * @Web www.yeyusmile.top
 * @date 2022/4/14 15:14
 */
public class MyQQUtil {


    public static JsonObject getRoot(String resp){
        JsonObject root = null;
        try {
            JsonParser jsonParser = new JsonParser();
            JsonElement element = jsonParser.parse(resp);
             root = element.getAsJsonObject();
        }catch (Exception e){
            e.printStackTrace();
        }
        return root;
    }

    public static Gson getGson(){

        return new Gson();
    }
}
